"""Main config file."""

def doUnison(system, configName):
    _rv = system.shell.execute("python", [r"/Users/ilya/Devel/unison/doSync.py", configName])
    _rc = _rv.wait()
    if _rc != 0:
        raise RuntimeError("Strange Unison return code %r" % _rc)


def execute(system):
    # Always perform internal folder sync
    doUnison(system, "macbook_internal")
    if system.plugins.airport.SSID == "Cranfield Prisoniers":
        doUnison(system, "macbook_to_nas_local")

# vim: set sts=4 sw=4 et :
